/**
 * @SpriteRootContainer.as
 * 
 * @author sodaChen mail:asframe@163.com
 * @version 1.0
 * <br>Copyright (C), 2010 asFrame.com
 * <br>This program is protected by copyright laws.
 * <br>Program Name:AStruts2
 * <br>Date:2012-4-16
 */
package com.asframe.astruts2.interfaces.impl
{
	import flash.display.Sprite;
	import flash.display.Sprite;
	import com.asframe.astruts2.interfaces.IRootContainer;
	
	/**
	 * 提供使用Sprite对象作为根容器对象的基础。一般的游戏都可以采用该基类
	 * @author sodaChen
	 * @Date:2012-4-16
	 */
	public class SpriteRootContainer extends Sprite implements IRootContainer
	{
		/** 显示对象容器 **/
		private var viewContainer			:Sprite;
		/** loding容器 **/
		private var loadingContainer		:Sprite;
		/** 顶层容器 **/
		private var topContainer			:Sprite;
		/** 顶层容器 **/
		private var bottomContainer		:Sprite;
		
		public function SpriteRootContainer()
		{
			viewContainer			 = new Sprite();
			loadingContainer		 = new Sprite();
			topContainer			 = new Sprite();
			bottomContainer			 = new Sprite();
			
			addChild(viewContainer);
			addChild(loadingContainer);
			addChild(topContainer);		
			addChild(bottomContainer);	
		}
		
		public function getViewContainer():Sprite
		{
			return viewContainer;
		}
		
		public function getLoadingContainer():Sprite
		{
			return loadingContainer;
		}
		
		public function getTopContainer():Sprite
		{
			return topContainer;
		}
		public function getBottomContainer():Sprite
		{
			return topContainer;
		}
		
		public function RootContainer():Sprite
		{
			return this;
		}
	}
}
